package bch.rocketmq.tomcat;

import jakarta.servlet.ServletContext;
import jakarta.servlet.ServletException;
import org.springframework.web.SpringServletContainerInitializer;
import org.springframework.web.WebApplicationInitializer;

/**
 * 相当于 web.xml，容器启动时会调用 {@link SpringServletContainerInitializer} spi
 *      springboot项目中不会生效:内嵌容器并不会去读取 META-INF/services/jakarta.servlet.ServletContainerInitializer 文件
 */
public class MyWebApplicationInitializer implements WebApplicationInitializer {
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        System.out.println("MyWebApplicationInitializer is invoked!");
    }
}
